import random

def sparseObstacle(obstacleNum, length, width, startPoint, endPoint, mostR, minR):
    obstacle = []
    for i in range(obstacleNum):
        x = 0
        y = 0
        r = 0
        while abs(startPoint[0] - x) + abs(startPoint[1] - y) <= abs(r) or abs(endPoint[0] - x) + abs(endPoint[1] - y) <= abs(r):
            x = random.uniform(0, length - 1)
            y = random.uniform(0, width - 1)
            r = random.uniform(minR, mostR)
        location = (x,y,r)
        obstacle.append(location)
    return obstacle